

install(FILES ${PROJECT_ROOT}/setup/datastore.s3db DESTINATION .)

install(DIRECTORY ${PROJECT_ROOT}/webadmin/dist/ DESTINATION webroot FILES_MATCHING PATTERN "*.*")


if(WIN32)
	install(FILES ${THIRD_PARTY}/sqlite/bin/sqlite3.dll DESTINATION .)
	
else()
	install(FILES ${THIRD_PARTY}/sqlite/lib/libsqlite3.so DESTINATION lib)
		
endif()

set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .)
include(InstallRequiredSystemLibraries)

#set(CPACK_PACKAGE_DIRECTORY ${PROJECT_ROOT})
set(CPACK_PACKAGE_NAME "ImageWatcher")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "image watcher")
set(CPACK_PACKAGE_VENDOR "www.100wits.com")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "4")

if(UNIX)
	SET(CPACK_GENERATOR "TGZ")
else()
	SET(CPACK_GENERATOR "ZIP")
endif()

set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/dist")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") 

include(CPack)
